package com.ym.domain.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnComment;
import com.gitee.sunchenbin.mybatis.actable.annotation.Index;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableComment;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import java.time.LocalDateTime;

@Data
@Table
@TableComment("域名结构表")
public class DmDomainStructure {

    public DmDomainStructure(Long domainId, String structure) {
        this.domainId = domainId;
        this.structure = structure;
    }

    @IsKey
    @TableId(type = IdType.ASSIGN_ID)
    @Column
    @ColumnComment("主键ID")
    private Long id;

    /**
     * 域名构成类型： 纯数字,三数字,四数字,五数字,六数字,七数字,八数字,九数字,纯字母,全声母,三声母,四声母,五声母,三字母,四字母,拼音域名,单拼域名,
     *            双拼域名,三拼域名,四拼域名,单拼与双拼域名,双拼与三拼域名,数字+字母,2杂,3杂,4杂,5杂,中文域名,排除中文域名,
     *            排除“-”中线,排除数字
     */
    public static final String STRUCTURE_NUMBER = "N";
    public static final String STRUCTURE_THREE_NUMBER = "3N";
    public static final String STRUCTURE_FOUR_NUMBER = "4N";
    public static final String STRUCTURE_FIVE_NUMBER = "5N";
    public static final String STRUCTURE_SIX_NUMBER = "6N";
    public static final String STRUCTURE_SEVEN_NUMBER = "7N";
    public static final String STRUCTURE_EIGHT_NUMBER = "8N";
    public static final String STRUCTURE_NINE_NUMBER = "9N";
    public static final String STRUCTURE_LETTER = "L";
    public static final String STRUCTURE_FULL_SOUNDS = "S";
    public static final String STRUCTURE_THREE_SOUNDS = "3S";
    public static final String STRUCTURE_FOUR_SOUNDS = "4S";
    public static final String STRUCTURE_FIVE_SOUNDS = "5S";
    public static final String STRUCTURE_THREE_LETTER = "3L";
    public static final String STRUCTURE_FOUR_LETTER = "4L";
    public static final String STRUCTURE_PINYIN = "P";
    public static final String STRUCTURE_SINGLE_PINYIN = "1P";
    public static final String STRUCTURE_DOUBLE_PINYIN = "2P";
    public static final String STRUCTURE_THREE_PINYIN = "3P";
    public static final String STRUCTURE_FOUR_PINYIN = "4P";
    public static final String STRUCTURE_SINGLE_OR_DOUBLE_PINYIN = "1P/2P";
    public static final String STRUCTURE_DOUBLE_OR_TRIPLE_PINYIN = "2P/3P";
    public static final String STRUCTURE_MIXED = "M";
    public static final String STRUCTURE_TWO_MIXED = "2M";
    public static final String STRUCTURE_THREE_MIXED = "3M";
    public static final String STRUCTURE_FOUR_MIXED = "4M";
    public static final String STRUCTURE_FIVE_MIXED = "5M";
    public static final String STRUCTURE_CHINESE = "C";
    public static final String STRUCTURE_EXCLUDE_CHINESE = "EC";
    public static final String STRUCTURE_EXCLUDE_HYPHEN = "EH";
    public static final String STRUCTURE_EXCLUDE_NUMBER = "EN";

    /**
     * 域名ID
     */
    @Column
    @ColumnComment("域名ID")
    @Index
    private Long domainId;

    /**
     * 域名构成类型
     */
    @Column(length = 10)
    @ColumnComment("域名构成类型")
    private String structure;

    @Column
    @ColumnComment("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

}
